package msu.ml.util;

import java.security.*;
import java.math.*;

public class StringUtility
{
    public static String getMD5(String input)
    {
        try
        {
            MessageDigest m = MessageDigest.getInstance("MD5");
            m.update(input.getBytes(), 0, input.length());
            return String.format("%1$032x", new BigInteger(1, m.digest()));
        }
        catch(NoSuchAlgorithmException e)
        {
            return "";
        }
    }
}
